<template>
  <div class="hello">

    <h1 style="color: red" v-for="user in users">
      {{ user }}
    </h1>


  </div>
</template>

<script>
export default {
  name: "Son",
  props: {
    users: {           //这个就是父组件中子标签自定义名字
      type: Array,
      required: true
    }
  },
  data() {
    return {
      title: "Vue.js Demo"
    }
  },
  methods: {
    changeTitle() {
      this.$emit("titleChanged", "子向父组件传值");//自定义事件  传递值"子向父组件传值"
    }
  }
}
</script>

<style scoped>
h1 {

}

</style>
